import request from '@/utils/request'

// 查询用户生词本列表
export function listUserbook(query) {
  return request({
    url: '/language/userbook/list',
    method: 'get',
    params: query
  })
}

// 查询用户生词本详细
export function getUserbook(id) {
  return request({
    url: '/language/userbook/' + id,
    method: 'get'
  })
}

// 新增用户生词本
export function addUserbook(data) {
  return request({
    url: '/language/userbook',
    method: 'post',
    data: data
  })
}

// 修改用户生词本
export function updateUserbook(data) {
  return request({
    url: '/language/userbook',
    method: 'put',
    data: data
  })
}

// 删除用户生词本
export function delUserbook(id) {
  return request({
    url: '/language/userbook/' + id,
    method: 'delete'
  })
}
